/*
 * @(#) LTActionServlet.java  1.0  2004-4-13
 *
 * Copyright 2003 by LongTop Corporation.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * LongTop Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with LongTop.
 */

package com.cnc.bas.web;

import com.cnc.bas.util.DateConvert;
import com.cnc.bas.util.StringConvert;

import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.StringConverter;
import org.apache.struts.action.ActionServlet;

import javax.servlet.ServletException;

/**
 * User: Du bf
 * Date: 2004-4-13
 * Time: 12:15:12
 */
public class LTActionServlet extends ActionServlet {

    /**
     * 重载init()方法
     * 为struts解析重新注册一些改造过的表单元素数据解析方法
     */
    public void init() throws ServletException {
        super.init();
        ConvertUtils.register(new DateConvert(), java.util.Date.class);
        ConvertUtils.deregister(StringConverter.class);
        ConvertUtils.register(new StringConvert(), String.class);
    }

}


